home *** CD-ROM | disk | FTP | other *** search
- package javax.swing.plaf.basic;
-
- import java.awt.Point;
- import java.awt.Rectangle;
- import java.awt.event.MouseEvent;
- import java.awt.event.MouseMotionAdapter;
-
- public class BasicComboPopup$InvocationMouseMotionHandler extends MouseMotionAdapter {
- // $FF: synthetic field
- private final BasicComboPopup this$0;
-
- protected BasicComboPopup$InvocationMouseMotionHandler(BasicComboPopup var1) {
- this.this$0 = var1;
- }
-
- public void mouseDragged(MouseEvent var1) {
- if (this.this$0.isVisible()) {
- MouseEvent var2 = this.this$0.convertMouseEvent(var1);
- Rectangle var3 = new Rectangle();
- this.this$0.list.computeVisibleRect(var3);
- if (var2.getPoint().y >= var3.y) {
- int var10001 = var3.y + var3.height;
- if (var2.getPoint().y <= var10001 - 1) {
- this.this$0.hasEntered = true;
- if (this.this$0.isAutoScrolling) {
- this.this$0.stopAutoScrolling();
- }
-
- Point var5 = var2.getPoint();
- if (var3.contains(var5)) {
- this.this$0.valueIsAdjusting = true;
- this.this$0.updateListBoxSelectionForEvent(var2, false);
- this.this$0.valueIsAdjusting = false;
- }
-
- return;
- }
- }
-
- if (this.this$0.hasEntered) {
- int var4 = var2.getPoint().y < var3.y ? 0 : 1;
- if (this.this$0.isAutoScrolling && this.this$0.scrollDirection != var4) {
- this.this$0.stopAutoScrolling();
- this.this$0.startAutoScrolling(var4);
- } else if (!this.this$0.isAutoScrolling) {
- this.this$0.startAutoScrolling(var4);
- }
- } else if (var1.getPoint().y < 0) {
- this.this$0.hasEntered = true;
- this.this$0.startAutoScrolling(0);
- }
- }
-
- }
- }
-